﻿using System.Collections.Generic;
using BusinessLogic.BusinessEntity.Entities;

namespace BusinessLogic.Mappers.User
{
	public interface IUserMapper : IMapperBase<BusinessEntity.Entities.User>
	{
		bool Exists(int userId);
		bool Exists(string login);
		BusinessEntity.Entities.User GetByAccountCode(string accountCode);
		int? EnsureUserCredentials(string login, string password);
		string GetUserPublicKey(int userId);
		IList<Role> GetUserRoles(int userId);
		IEnumerable<BusinessEntity.Entities.User> GetAllUsers();
		void AssignRole(int userId, Role role);
		void DeleteRole(int userId, Role role);
		void DeleteAllRoles(int userId);
		IList<Role> GetRoles();
		IDictionary<BusinessEntity.Entities.User, IList<Role>> GetUserRolePairs();
	}
}